// 所有关键字历史的本地操作封装

const HISTORY_KEY = 'geek_history_seach'

// 存
export function setHistory(history: string[]) {
  localStorage.setItem('HISTORY_KEY', JSON.stringify(history))
}

// 取
export function getHistory(): string[] {
  return JSON.parse(localStorage.getItem(HISTORY_KEY) || '[]')
}

// 移除
export function removeHistory() {
  localStorage.removeItem(HISTORY_KEY)
}
